home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1998 January: Mac OS SDK / Dev.CD Jan 98 SDK1.toast / Development Kits (Disc 1) / Interfaces&Libraries / Universal / Interfaces / AIncludes / PCCard.a < prev    next >
Encoding:
Text File  |  1997-08-12  |  25.3 KB  |  668 lines  |  [TEXT/MPS ]

  1. ;
  2. ;    File:        PCCard.a
  3. ;
  4. ;    Contains:    PC Card Family Programming interface
  5. ;
  6. ;    Version:    Technology:    System 7.5
  7. ;                Release:    Universal Interfaces 3.0.1
  8. ;
  9. ;    Copyright:    © 1996-1997 by Apple Computer, Inc.  All rights reserved.
  10. ;
  11. ;    Bugs?:        Please include the the file and version information (from above) with
  12. ;                the problem description.  Developers belonging to one of the Apple
  13. ;                developer programs can submit bug reports to:
  14. ;
  15. ;                    devsupport@apple.com
  16. ;
  17. ;
  18.     IF &TYPE('__PCCARD__') = 'UNDEFINED' THEN
  19. __PCCARD__ SET 1
  20.  
  21.     IF &TYPE('__TYPES__') = 'UNDEFINED' THEN
  22.     include 'Types.a'
  23.     ENDIF
  24.     IF &TYPE('__NAMEREGISTRY__') = 'UNDEFINED' THEN
  25.     include 'NameRegistry.a'
  26.     ENDIF
  27.  
  28.  
  29. kServiceCategoryPCCard            EQU        'pccd'
  30.  
  31. ; typedef UInt32                         PCCardEvent
  32.  
  33. ; typedef UInt32                         PCCardEventMask
  34.  
  35. ; typedef UInt32                         PCCardClientID
  36.  
  37. ; typedef UInt32                         PCCardTimerID
  38.  
  39. ; typedef UInt32                         PCCardSocket
  40.  
  41. ; typedef UInt32                         PCCardWindowID
  42.  
  43. ; typedef UInt32                         PCCardWindowType
  44.  
  45. ; typedef UInt32                         PCCardWindowSize
  46.  
  47. ; typedef UInt32                         PCCardWindowOffset
  48.  
  49. ; typedef UInt32                         PCCardWindowAlign
  50.  
  51. ; typedef OptionBits                     PCCardWindowState
  52.  
  53. ; typedef UInt32                         PCCardAccessSpeed
  54.  
  55. ; typedef UInt32                         PCCardWindowParam
  56.  
  57. ; typedef UInt32                         PCCardPage
  58.  
  59. ; typedef UInt32                         PCCardVoltage
  60.  
  61. ;    Several of the client notification bit flags have been REMOVED since the first
  62. ;    release of this header.  These were unused codes that were either
  63. ;    copied directly from PC Card 2.x, or from the PCMCIA standard.  In all cases,
  64. ;    they were completely unimplemented and would never be sent under PCCard 3.0.
  65. ;    
  66. ;    The removed flags are:
  67. ;        kPCCardClientInfoMessage, kPCCardSSUpdatedMessage,
  68. ;        and kPCCardFunctionInterruptMessage.
  69. ;    
  70. ;    If your software used any of these flags, you should delete any references
  71. ;    to them.  These event codes are being recycled for new features.
  72. ;
  73.  
  74. ;  Client notification bit flags 
  75.  
  76. kPCCardNullMessage                EQU        $00000000            ; no messages pending (not sent to clients)
  77. kPCCardInsertionMessage            EQU        $00000001            ; card has been inserted into the socket
  78. kPCCardRemovalMessage            EQU        $00000002            ; card has been removed from the socket- do not touch hardware!
  79.                                                             ; Lock and Unlock may be used for a hardware locking card-cage. 
  80. kPCCardLockMessage                EQU        $00000004            ; card is locked into the socket with a mechanical latch 
  81. kPCCardUnlockMessage            EQU        $00000008            ; card is no longer locked into the socket 
  82.                                                             ; Ready and Reset are holdovers from PC Card 2.x, but someone might be using them (!?) 
  83. kPCCardReadyMessage                EQU        $00000010            ; card is ready to be accessed -- do not use! this event is never sent! (use kPCCardInsertion instead) 
  84. kPCCardResetMessage                EQU        $00000020            ; physical reset has completed -- do not use! this event is never sent! (use kPCCardResetComplete instead) 
  85.                                                             ; InsertionRequest and InsertionComplete may be used with certain cages (??) 
  86. kPCCardInsertionRequestMessage    EQU        $00000040            ; request to insert a card using insertion motor 
  87. kPCCardInsertionCompleteMessage    EQU        $00000080            ; insertion motor has finished inserting a card 
  88. kPCCardEjectionRequestMessage    EQU        $00000100            ; user or other client is requesting a card ejection
  89. kPCCardEjectionCompleteMessage    EQU        $00000200            ; card ejection succeeded- do not touch hardware! 
  90. kPCCardEjectionFailedMessage    EQU        $00000400            ; eject failure due to electrical/mechanical problems
  91. kPCCardPMResumeMessage            EQU        $00000800            ; power management resume 
  92. kPCCardPMSuspendMessage            EQU        $00001000            ; power management suspend 
  93. kPCCardPMSuspendRequest            EQU        $00002000            ; power management sleep request 
  94. kPCCardPMSuspendRevoke            EQU        $00004000            ; power management sleep revoke 
  95. kPCCardResetPhysicalMessage        EQU        $00008000            ; physical reset is about to occur on this card -- this event is never sent! 
  96. kPCCardResetRequestMessage        EQU        $00010000            ; physical reset has been requested by a client
  97. kPCCardResetCompleteMessage        EQU        $00020000            ; ResetCard() background reset has completed
  98. kPCCardBatteryDeadMessage        EQU        $00040000            ; battery is no longer useable, data will be lost
  99. kPCCardBatteryLowMessage        EQU        $00080000            ; battery is weak and should be replaced
  100. kPCCardWriteProtectMessage        EQU        $00100000            ; card is now write protected
  101. kPCCardWriteEnabledMessage        EQU        $00200000            ; card is now write enabled
  102. kPCCardUnexpectedRemovalMessage    EQU        $02000000            ; card has unexpectedly been manually ejected -- careful, this event occurs at hardware interrupt time 
  103.                                                             ; Unconfigured is a (currently unused) holdover from PC Card 2.x 
  104. kPCCardUnconfiguredMessage        EQU        $04000000            ; a CARD_READY was delivered to all clients and no client 
  105.                                                             ;    requested a configuration for the socket -- this event is never sent under PCCard 3.0! 
  106. kPCCardStatusChangedMessage        EQU        $08000000            ; status change for cards in I/O mode
  107. kPCCardTimerExpiredMessage        EQU        $10000000            ; message sent when requested time has expired 
  108. kPCCardRequestAttentionMessage    EQU        $20000000
  109. kPCCardEraseCompleteMessage        EQU        $40000000
  110. kPCCardRegistrationCompleteMessage EQU    $80000000            ; notifications available only in PCCard 3.1 and later 
  111. kPCCardPMEnabledMessage            EQU        $00800000            ; power management has been enabled by the user; if appropriate, clients should call PCCardSetPowerLevel(off) 
  112. ; typedef OptionBits                     PCCardWindowAttributes
  113.  
  114. ;     window state (values of PCCardWindowAttributes) 
  115.  
  116. kWSCommon                        EQU        $0001                ; common memory window 
  117. kWSAttribute                    EQU        $0002                ; attribute memory window
  118. kWSIO                            EQU        $0004                ; I/O window
  119. kWSCardBus                        EQU        $0800                ; CardBus bridge window 
  120. kWSTypeMask                        EQU        $0807                ; window type mask
  121. kWSEnabled                        EQU        $0008                ; window enabled
  122. kWS8bit                            EQU        $0010                ; 8-bit data width window
  123. kWS16bit                        EQU        $0020                ; 16-bit data width window
  124. kWS32bit                        EQU        $0040                ; 32-bit data width window
  125. kWSAutoSize                        EQU        $0080                ; auto-size data width window
  126. kWSWidthMask                    EQU        $00F0                ; window data width mask
  127. kWSProtected                    EQU        $0100                ; window write protected
  128. kWSPrefetchable                    EQU        $0200                ; bridge window prefetchable
  129. kWSPageShared                    EQU        $0400                ; page register is shared
  130. kWSWindowSizeOffset                EQU        $4000
  131. kWSChangeAccessSpeed            EQU        $8000                ; Used by CSModifyWindow only 
  132. ;  window speed (sample values of PCCardAccessSpeed) for use in PCCardRequestWindow  
  133.  
  134. kAccessSpeed600ns                EQU        $006A
  135. kAccessSpeed500ns                EQU        $005A
  136. kAccessSpeed400ns                EQU        $004A
  137. kAccessSpeed300ns                EQU        $003A
  138. kAccessSpeed250ns                EQU        $0001
  139. kAccessSpeed200ns                EQU        $0002
  140. kAccessSpeed150ns                EQU        $0003
  141. kAccessSpeed100ns                EQU        $0004
  142. ; typedef UInt32                         PCCardInterfaceType
  143.  
  144. ;  InterfaceType bit-mask (values of PCCardInterfaceType) 
  145.  
  146. kIFTypeMask                        EQU        $03                    ; IO & memory type mask
  147. kIFCardBus                        EQU        $00                    ; if bits 0 & 1 are zero then cardbus interface
  148. kIFMemory                        EQU        $01                    ; if bit 0 set memory IF
  149. kIFIO                            EQU        $02                    ; if bit 1 set IO IF
  150. kIFReserved                        EQU        $03                    ; bits 0 and 1 set is reserved 
  151. kIFDMA                            EQU        $08                    ; if bit 3 set DMA supported
  152. kIFVSKey                        EQU        $10                    ; if bit 4 set supports low Voltage key
  153. kIF33VCC                        EQU        $20                    ; if bit 5 set socket suports 3.3v
  154. kIFXXVCC                        EQU        $40                    ; if bit 6 set socket supports X.X voltage
  155. kIFYYVCC                        EQU        $80                    ; if bit 7 set socket supports Y.Y voltage
  156. ; typedef UInt32                         PCCardCustomInterfaceID
  157.  
  158. ;  Custom Interface Identifiers (values of PCCardCustomInterfaceID) 
  159.  
  160. kIFCustom_None                    EQU        $00                    ; no custom interface ID 
  161. kIFCustom_ZOOM                    EQU        $41                    ; ZOOM Video Mode custom interface identifier 
  162. ; typedef OptionBits                     PCCardConfigOptions
  163.  
  164. ;  Bit mask values for PCCardConfigOptions in the configuration calls 
  165.  
  166. kEnableIRQSteering                EQU        $0002
  167. kIRQChangeValid                    EQU        $0004
  168. kVppChangeValid                    EQU        $0010
  169. kEnableDMAChannel                EQU        $0040
  170. kDMAChangeValid                    EQU        $0080
  171. kVSOverride                        EQU        $0200                ; Bits 10..31 reserved 
  172.  
  173. ;   Configuration Registers Presence Mask for the FCR
  174. ;   Used by PCCardConfigPresentMask
  175.  
  176.  
  177.  
  178. kConfigOptionPresent            EQU        $00000001
  179. kConfigStatusPresent            EQU        $00000002
  180. kPinReplacePresent                EQU        $00000004
  181. kSocketCopyPresent                EQU        $00000008
  182. kExtendedStatusPresent            EQU        $00000010
  183. kIOBase0Present                    EQU        $00000020
  184. kIOBase1Present                    EQU        $00000040
  185. kIOBase2Present                    EQU        $00000080
  186. kIOBase3Present                    EQU        $00000100
  187. kIOLimitPresent                    EQU        $00000200
  188. ; typedef UInt32                         PCCardConfigPresentMask
  189.  
  190. ; typedef UInt32                         PCCardConfigRegisterIndex
  191.  
  192. ; typedef UInt32                         PCCardConfigRegisterOffset
  193.  
  194. PCCardFunctionConfigReg    RECORD 0
  195. configOptionReg             ds.b    1                ; offset: $0 (0)
  196. configStatusReg             ds.b    1                ; offset: $1 (1)
  197. pinReplaceReg             ds.b    1                ; offset: $2 (2)
  198. socketCopyReg             ds.b    1                ; offset: $3 (3)
  199. extendedStatusReg         ds.b    1                ; offset: $4 (4)
  200. ioBase0                     ds.b    1                ; offset: $5 (5)
  201. ioBase1                     ds.b    1                ; offset: $6 (6)
  202. ioBase2                     ds.b    1                ; offset: $7 (7)
  203. ioBase3                     ds.b    1                ; offset: $8 (8)
  204. ioLimit                     ds.b    1                ; offset: $9 (9)
  205. sizeof                     EQU *                    ; size:   $A (10)
  206.                         ENDR
  207. ; typedef OptionBits                     PCCardSocketStatus
  208.  
  209. ;     general socket status bits (values of PCCardSocketStatus) 
  210.  
  211. kSTBatteryDead                    EQU        $0001                ; battery dead
  212. kSTBatteryLow                    EQU        $0002                ; battery low
  213. kSTBatteryGood                    EQU        $0004                ; battery good
  214. kSTPower                        EQU        $0008                ; power is applied
  215. kST16bit                        EQU        $0010                ; 16-bit PC Card present
  216. kSTCardBus                        EQU        $0020                ; CardBus PC Card present
  217. kSTMemoryCard                    EQU        $0040                ; memory card present
  218. kSTIOCard                        EQU        $0080                ; I/O card present
  219. kSTNotACard                        EQU        $0100                ; unrecognizable PC Card detected
  220. kSTReady                        EQU        $0200                ; ready
  221. kSTWriteProtect                    EQU        $0400                ; card is write-protected
  222. kSTDataLost                        EQU        $0800                ; data may have been lost due to card removal
  223. kSTRingIndicate                    EQU        $1000                ; ring indicator is active
  224. kSTReserved                        EQU        $E000
  225. ;  Bit mask for PCCardPowerOptions in the power management calls 
  226. ; typedef OptionBits                     PCCardPowerOptions
  227.  
  228.  
  229. kPCCardPowerOn                    EQU        $00000001
  230. kPCCardPowerOff                    EQU        $00000002
  231. kPCCardLowPower                    EQU        $00000004
  232. ; typedef OptionBits                     PCCardAdapterCapabilities
  233.  
  234. ; typedef UInt32                         PCCardAdapterPowerState
  235.  
  236. ; typedef OptionBits                     PCCardSCEvents
  237.  
  238. ; typedef UInt32                         PCCardWindow
  239.  
  240. ; typedef UInt32                         PCCardIRQ
  241.  
  242. ; typedef UInt32                         PCCardDMA
  243.  
  244. ;  Selectors for PCCardGetGlobalOptions 
  245. ;     The type of the "value" parameter is provided for each selector. 
  246. ; typedef UInt32                         PCCardOptionSelector
  247.  
  248.  
  249. kPCCardPowerManagementAttrib    EQU        1                    ; value = (Boolean*) enabled  
  250.  
  251.  
  252. ;  Types and structures for accessing the PCCard Assigned-Address property.
  253.  
  254.  
  255. kPCCardNonRelocatableSpace        EQU        $80
  256. kPCCardPrefetchableSpace        EQU        $40
  257. kPCCard16BitSpace                EQU        $20
  258. kPCCardAddressTypeCodeMask        EQU        $07
  259. kPCCardConfigSpace                EQU        0
  260. kPCCardIOSpace                    EQU        1
  261. kPCCardMemorySpace                EQU        2
  262. kPCCardAttributeMemorySpace        EQU        4
  263. ; typedef UInt8                         PCCardAddressSpaceFlags
  264.  
  265.  
  266. kPCCardSocketNumberMask            EQU        $F8
  267. kPCCardFunctionNumberMask        EQU        $07
  268. ; typedef UInt8                         PCCardSocketFunction
  269.  
  270. ; typedef UInt8                         PCCardBusNumber
  271.  
  272. ; typedef UInt8                         PCCardRegisterNumber
  273.  
  274.  
  275. ;   note: this structure is similar, but not the same as the PCIAssignedAddress structure
  276. ;         16-bit cards use this structure, CardBus cards use PCIAssignedAddress
  277.  
  278.  
  279. PCCardAssignedAddress    RECORD 0
  280. addressSpaceFlags         ds.b    1                ; offset: $0 (0)
  281. reserved                 ds.b    1                ; offset: $1 (1)
  282. socketFunctionNumber     ds.b    1                ; offset: $2 (2)
  283. registerNumber             ds.b    1                ; offset: $3 (3)
  284. address                     ds.l    1                ; offset: $4 (4)
  285. size                     ds.l    1                ; offset: $8 (8)
  286. sizeof                     EQU *                    ; size:   $C (12)
  287.                         ENDR
  288. ; typedef struct PCCardAssignedAddress * PCCardAssignedAddressPtr
  289.  
  290. ; ----------------------------------------------------------------------
  291. ;    Client Support
  292. ;----------------------------------------------------------------------
  293.  
  294. ;  Prototype for client callback 
  295. ;
  296. ; extern OSStatus PCCardRegisterClient(const RegEntryID *deviceRef, PCCardEventMask eventMask, PCCardEventHandler clientCallBack, void *clientParam, PCCardClientID *newClientID)
  297. ;
  298.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  299.         IMPORT_CFM_FUNCTION PCCardRegisterClient
  300.     ENDIF
  301.  
  302. ;
  303. ; extern OSStatus PCCardDeRegisterClient(PCCardClientID theClientID)
  304. ;
  305.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  306.         IMPORT_CFM_FUNCTION PCCardDeRegisterClient
  307.     ENDIF
  308.  
  309. ;
  310. ; extern OSStatus PCCardRegisterTimer(PCCardClientID registeredClientID, PCCardTimerID *lpNewTimerID, long delay)
  311. ;
  312.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  313.         IMPORT_CFM_FUNCTION PCCardRegisterTimer
  314.     ENDIF
  315.  
  316. ;
  317. ; extern void PCCardDeRegisterTimer(PCCardTimerID timerID)
  318. ;
  319.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  320.         IMPORT_CFM_FUNCTION PCCardDeRegisterTimer
  321.     ENDIF
  322.  
  323. ;
  324. ; extern OSStatus PCCardSetEventMask(PCCardClientID theClientID, PCCardEventMask newEventMask)
  325. ;
  326.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  327.         IMPORT_CFM_FUNCTION PCCardSetEventMask
  328.     ENDIF
  329.  
  330. ;
  331. ; extern OSStatus PCCardGetEventMask(PCCardClientID theClientID, PCCardEventMask *newEventMask)
  332. ;
  333.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  334.         IMPORT_CFM_FUNCTION PCCardGetEventMask
  335.     ENDIF
  336.  
  337. ;
  338. ; extern OSStatus PCCardGetCardServicesInfo(ItemCount *socketCount, UInt32 *complianceLevel, UInt32 *version)
  339. ;
  340.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  341.         IMPORT_CFM_FUNCTION PCCardGetCardServicesInfo
  342.     ENDIF
  343.  
  344. ;
  345. ; extern OSStatus PCCardGetSocketRef(PCCardSocket vSocket, RegEntryID *socketRef)
  346. ;
  347.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  348.         IMPORT_CFM_FUNCTION PCCardGetSocketRef
  349.     ENDIF
  350.  
  351. ;
  352. ; extern OSStatus PCCardGetCardRef(PCCardSocket vSocket, RegEntryID *cardRef)
  353. ;
  354.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  355.         IMPORT_CFM_FUNCTION PCCardGetCardRef
  356.     ENDIF
  357.  
  358. ;
  359. ; extern OSStatus PCCardGetDeviceRef(PCCardSocket vSocket, UInt32 device, RegEntryID *deviceRef)
  360. ;
  361.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  362.         IMPORT_CFM_FUNCTION PCCardGetDeviceRef
  363.     ENDIF
  364.  
  365. ;
  366. ; extern OSStatus PCCardGetSocketAndDeviceFromDeviceRef(const RegEntryID *deviceRef, PCCardSocket *vSocket, UInt32 *device)
  367. ;
  368.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  369.         IMPORT_CFM_FUNCTION PCCardGetSocketAndDeviceFromDeviceRef
  370.     ENDIF
  371.  
  372. ;
  373. ; extern OSStatus PCCardGetCardRefFromDeviceRef(const RegEntryID *deviceRef, RegEntryID *cardRef)
  374. ;
  375.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  376.         IMPORT_CFM_FUNCTION PCCardGetCardRefFromDeviceRef
  377.     ENDIF
  378.  
  379.  
  380. ; ----------------------------------------------------------------------
  381. ;    Resource Management
  382. ;----------------------------------------------------------------------
  383.  
  384. ;
  385. ; extern OSStatus PCCardRequestWindow(const RegEntryID *deviceRef, PCCardWindowAttributes windowAttributes, LogicalAddress *windowBase, ByteCount *windowSize, PCCardAccessSpeed *windowSpeed, PCCardWindowOffset *windowOffset, PCCardWindowID *windowID)
  386. ;
  387.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  388.         IMPORT_CFM_FUNCTION PCCardRequestWindow
  389.     ENDIF
  390.  
  391. ;
  392. ; extern OSStatus PCCardModifyWindow(PCCardWindowID windowID, PCCardWindowAttributes windowAttributes, PCCardAccessSpeed windowSpeed, PCCardWindowOffset windowOffset)
  393. ;
  394.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  395.         IMPORT_CFM_FUNCTION PCCardModifyWindow
  396.     ENDIF
  397.  
  398. ;
  399. ; extern OSStatus PCCardReleaseWindow(PCCardWindowID windowID)
  400. ;
  401.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  402.         IMPORT_CFM_FUNCTION PCCardReleaseWindow
  403.     ENDIF
  404.  
  405. ;
  406. ; extern OSStatus PCCardInquireWindow(const RegEntryID *deviceRef, PCCardWindowID windowID, PCCardWindowAttributes *windowAttributes, LogicalAddress *windowBase, ByteCount *windowSize, PCCardAccessSpeed *windowSpeed, PCCardWindowOffset *windowOffset)
  407. ;
  408.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  409.         IMPORT_CFM_FUNCTION PCCardInquireWindow
  410.     ENDIF
  411.  
  412. ;
  413. ; extern OSStatus PCCardGetStatus(const RegEntryID *deviceRef, UInt32 *currentState, UInt32 *changedState, PCCardVoltage *Vcc, PCCardVoltage *Vpp)
  414. ;
  415.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  416.         IMPORT_CFM_FUNCTION PCCardGetStatus
  417.     ENDIF
  418.  
  419. ;
  420. ; extern OSStatus PCCardRequestConfiguration(const RegEntryID *deviceRef, PCCardConfigOptions configOptions, PCCardInterfaceType ifType, PCCardCustomInterfaceID ifCustomType, PCCardVoltage vcc, PCCardVoltage vpp, LogicalAddress configRegistersBase, PCCardConfigPresentMask configRegistersPresent, PCCardFunctionConfigReg *configRegisterValues)
  421. ;
  422.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  423.         IMPORT_CFM_FUNCTION PCCardRequestConfiguration
  424.     ENDIF
  425.  
  426. ;
  427. ; extern OSStatus PCCardReleaseConfiguration(const RegEntryID *deviceRef)
  428. ;
  429.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  430.         IMPORT_CFM_FUNCTION PCCardReleaseConfiguration
  431.     ENDIF
  432.  
  433. ;
  434. ; extern OSStatus PCCardModifyConfiguration(const RegEntryID *deviceRef, PCCardConfigOptions configOptions, PCCardVoltage vpp)
  435. ;
  436.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  437.         IMPORT_CFM_FUNCTION PCCardModifyConfiguration
  438.     ENDIF
  439.  
  440. ;
  441. ; extern OSStatus PCCardReadConfigurationRegister(const RegEntryID *deviceRef, PCCardConfigRegisterIndex whichRegister, PCCardConfigRegisterOffset offset, UInt8 *value)
  442. ;
  443.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  444.         IMPORT_CFM_FUNCTION PCCardReadConfigurationRegister
  445.     ENDIF
  446.  
  447. ;
  448. ; extern OSStatus PCCardWriteConfigurationRegister(const RegEntryID *deviceRef, PCCardConfigRegisterIndex whichRegister, PCCardConfigRegisterOffset offset, UInt8 value)
  449. ;
  450.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  451.         IMPORT_CFM_FUNCTION PCCardWriteConfigurationRegister
  452.     ENDIF
  453.  
  454. ;
  455. ; extern OSStatus PCCardResetFunction(const RegEntryID *deviceRef)
  456. ;
  457.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  458.         IMPORT_CFM_FUNCTION PCCardResetFunction
  459.     ENDIF
  460.  
  461. ; ----------------------------------------------------------------------
  462. ;    Client Utilities
  463. ;----------------------------------------------------------------------
  464.  
  465. ; typedef UInt8                         PCCardTupleKind
  466.  
  467.  
  468.  
  469. ;
  470. ; extern PCCardTupleIterator PCCardNewTupleIterator(void )
  471. ;
  472.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  473.         IMPORT_CFM_FUNCTION PCCardNewTupleIterator
  474.     ENDIF
  475.  
  476. ;
  477. ; extern OSStatus PCCardDisposeTupleIterator(PCCardTupleIterator tupleIterator)
  478. ;
  479.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  480.         IMPORT_CFM_FUNCTION PCCardDisposeTupleIterator
  481.     ENDIF
  482.  
  483. ;
  484. ; extern OSStatus PCCardGetFirstTuple(const RegEntryID *deviceID, PCCardTupleKind desiredTuple, PCCardTupleIterator tupleIterator, void *dataBuffer, UInt32 *dataBufferSize, PCCardTupleKind *foundTuple, UInt32 *foundTupleDataSize)
  485. ;
  486.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  487.         IMPORT_CFM_FUNCTION PCCardGetFirstTuple
  488.     ENDIF
  489.  
  490. ;
  491. ; extern OSStatus PCCardGetNextTuple(const RegEntryID *deviceRef, PCCardTupleKind desiredTuple, PCCardTupleIterator tupleIterator, void *dataBuffer, UInt32 *dataBufferSize, PCCardTupleKind *foundTuple, UInt32 *foundTupleDataSize)
  492. ;
  493.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  494.         IMPORT_CFM_FUNCTION PCCardGetNextTuple
  495.     ENDIF
  496.  
  497. ; ----------------------------------------------------------------------
  498. ;    Miscellaneous
  499. ;----------------------------------------------------------------------
  500.  
  501. ;
  502. ; extern OSStatus PCCardEject(const RegEntryID *cardRef)
  503. ;
  504.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  505.         IMPORT_CFM_FUNCTION PCCardEject
  506.     ENDIF
  507.  
  508. ;
  509. ; extern OSStatus PCCardEnableModemSound(const RegEntryID *cardRef, Boolean enableSound)
  510. ;
  511.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  512.         IMPORT_CFM_FUNCTION PCCardEnableModemSound
  513.     ENDIF
  514.  
  515. ;
  516. ; extern OSStatus PCCardEnableZoomedVideoSound(const RegEntryID *cardRef, Boolean enableSound)
  517. ;
  518.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  519.         IMPORT_CFM_FUNCTION PCCardEnableZoomedVideoSound
  520.     ENDIF
  521.  
  522. ;
  523. ; extern OSStatus PCCardSetPowerLevel(const RegEntryID *deviceRef, PCCardPowerOptions powerLevel)
  524. ;
  525.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  526.         IMPORT_CFM_FUNCTION PCCardSetPowerLevel
  527.     ENDIF
  528.  
  529. ;
  530. ; extern OSStatus PCCardSetRingIndicate(const RegEntryID *deviceRef, Boolean setRingIndicate)
  531. ;
  532.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  533.         IMPORT_CFM_FUNCTION PCCardSetRingIndicate
  534.     ENDIF
  535.  
  536. ;
  537. ; extern OSStatus PCCardGetGlobalOptions(PCCardOptionSelector selector, void *value)
  538. ;
  539.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  540.         IMPORT_CFM_FUNCTION PCCardGetGlobalOptions
  541.     ENDIF
  542.  
  543. ; typedef UInt32                         PCCardDevType
  544.  
  545. ; typedef UInt32                         PCCardSubType
  546.  
  547. ;  values for PCCardType and PCCardSubType
  548.  
  549. kPCCardUnknownType                EQU        0
  550. kPCCardMultiFunctionType        EQU        1
  551. kPCCardMemoryType                EQU        2
  552. kPCCardNullSubType                EQU        0                    ; Memory sub types 
  553. kPCCardRomSubType                EQU        1
  554. kPCCardOTPromSubType            EQU        2
  555. kPCCardEpromSubType                EQU        3
  556. kPCCardEEpromSubType            EQU        4
  557. kPCCardFlashSubType                EQU        5
  558. kPCCardSramSubType                EQU        6
  559. kPCCardDramSubType                EQU        7
  560. kPCCardSerialPortType            EQU        3
  561. kPCCardSerialOnlySubType        EQU        0
  562. kPCCardDataModemSubType            EQU        1
  563. kPCCardFaxModemSubType            EQU        2
  564. kPCCardFaxAndDataModemMask        EQU        3
  565. kPCCardVoiceEncodingSubType        EQU        4
  566. kPCCardParallelPortType            EQU        4
  567. kPCCardFixedDiskType            EQU        5
  568. kPCCardUnknownFixedDiskType        EQU        0
  569. kPCCardATAInterfaceDiskSubType    EQU        1
  570. kPCCardRotatingDeviceSubType    EQU        $00
  571. kPCCardSiliconDevice            EQU        $80
  572. kPCCardVideoAdaptorType            EQU        6
  573. kPCCardNetworkAdaptorType        EQU        7
  574. kPCCardArcNetSubType            EQU        1                    ; network sub types 
  575. kPCCardEthernetSubType            EQU        2
  576. kPCCardTokenRingSubType            EQU        3
  577. kPCCardLocalTalkSubType            EQU        4
  578. kPCCardFDDI_CDDISubType            EQU        5
  579. kPCCardATMSubType                EQU        6
  580. kPCCardWirelessSubType            EQU        7
  581. kPCCardAIMSType                    EQU        8
  582. kPCCardSCSIType                    EQU        9
  583. ;
  584. ; extern OSStatus PCCardGetCardInfo(const RegEntryID *cardRef, PCCardDevType *cardType, PCCardSubType *cardSubType, StringPtr cardName, StringPtr vendorName)
  585. ;
  586.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  587.         IMPORT_CFM_FUNCTION PCCardGetCardInfo
  588.     ENDIF
  589.  
  590.  
  591. kPCCard16HardwareType            EQU        'pc16'
  592. kCardBusHardwareType            EQU        'cdbs'
  593. ; typedef UInt32                         PCCardHardwareType
  594.  
  595. ;
  596. ; extern OSStatus PCCardGetCardType(const RegEntryID *socketRef, PCCardHardwareType *cardType)
  597. ;
  598.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  599.         IMPORT_CFM_FUNCTION PCCardGetCardType
  600.     ENDIF
  601.  
  602. ;  error codes 
  603.  
  604. kBadAdapterErr                    EQU        -9050                ; invalid adapter number
  605. kBadAttributeErr                EQU        -9051                ; specified attributes field value is invalid
  606. kBadBaseErr                        EQU        -9052                ; specified base system memory address is invalid
  607. kBadEDCErr                        EQU        -9053                ; specified EDC generator specified is invalid
  608. kBadIRQErr                        EQU        -9054                ; specified IRQ level is invalid
  609. kBadOffsetErr                    EQU        -9055                ; specified PC card memory array offset is invalid
  610. kBadPageErr                        EQU        -9056                ; specified page is invalid
  611. kBadSizeErr                        EQU        -9057                ; specified size is invalid
  612. kBadSocketErr                    EQU        -9058                ; specified logical or physical socket number is invalid
  613. kBadTypeErr                        EQU        -9059                ; specified window or interface type is invalid
  614. kBadVccErr                        EQU        -9060                ; specified Vcc power level index is invalid
  615. kBadVppErr                        EQU        -9061                ; specified Vpp1 or Vpp2 power level index is invalid
  616. kBadWindowErr                    EQU        -9062                ; specified window is invalid
  617. kBadArgLengthErr                EQU        -9063                ; ArgLength argument is invalid
  618. kBadArgsErr                        EQU        -9064                ; values in argument packet are invalid
  619. kBadHandleErr                    EQU        -9065                ; clientHandle is invalid
  620. kBadCISErr                        EQU        -9066                ; CIS on card is invalid
  621. kBadSpeedErr                    EQU        -9067                ; specified speed is unavailable
  622. kReadFailureErr                    EQU        -9068                ; unable to complete read request
  623. kWriteFailureErr                EQU        -9069                ; unable to complete write request
  624. kGeneralFailureErr                EQU        -9070                ; an undefined error has occurred
  625. kNoCardErr                        EQU        -9071                ; no PC card in the socket
  626. kUnsupportedFunctionErr            EQU        -9072                ; function is not supported by this implementation
  627. kUnsupportedModeErr                EQU        -9073                ; mode is not supported
  628. kBusyErr                        EQU        -9074                ; unable to process request at this time - try later
  629. kWriteProtectedErr                EQU        -9075                ; media is write-protected
  630. kConfigurationLockedErr            EQU        -9076                ; a configuration has already been locked
  631. kInUseErr                        EQU        -9077                ; requested resource is being used by a client
  632. kNoMoreItemsErr                    EQU        -9078                ; there are no more of the requested item
  633. kOutOfResourceErr                EQU        -9079                ; Card Services has exhausted the resource
  634. kNoCardSevicesSocketsErr        EQU        -9080
  635. kInvalidRegEntryErr                EQU        -9081
  636. kBadLinkErr                        EQU        -9082
  637. kBadDeviceErr                    EQU        -9083
  638. k16BitCardErr                    EQU        -9084
  639. kCardBusCardErr                    EQU        -9085
  640. kPassCallToChainErr                EQU        -9086
  641. kCantConfigureCardErr            EQU        -9087
  642. kPostCardEventErr                EQU        -9088                ; _PCCSLPostCardEvent failed and dropped an event 
  643. kInvalidDeviceNumber            EQU        -9089
  644. kUnsupportedVsErr                EQU        -9090                ; Unsupported Voltage Sense 
  645. kInvalidCSClientErr                EQU        -9091                ; Card Services ClientID is not registered 
  646. kBadTupleDataErr                EQU        -9092                ; Data in tuple is invalid 
  647. kBadCustomIFIDErr                EQU        -9093                ; Custom interface ID is invalid 
  648. kNoIOWindowRequestedErr            EQU        -9094                ; Request I/O window before calling configuration 
  649. kNoMoreTimerClientsErr            EQU        -9095                ; All timer callbacks are in use 
  650. kNoMoreInterruptSlotsErr        EQU        -9096                ; All internal Interrupt slots are in use 
  651. kNoClientTableErr                EQU        -9097                ; The client table has not be initialized yet 
  652. kUnsupportedCardErr                EQU        -9098                ; Card not supported by generic enabler
  653. kNoCardEnablersFoundErr            EQU        -9099                ; No Enablers were found
  654. kNoEnablerForCardErr            EQU        -9100                ; No Enablers were found that can support the card
  655. kNoCompatibleNameErr            EQU        -9101                ; There is no compatible driver name for this device
  656. kClientRequestDenied            EQU        -9102                ; CS Clients should return this code inorder to 
  657.                                                             ;   deny a request-type CS Event                
  658. kNotReadyErr                    EQU        -9103                ; PC Card failed to go ready 
  659. kTooManyIOWindowsErr            EQU        -9104                ; device requested more than one I/O window 
  660. kAlreadySavedStateErr            EQU        -9105                ; The state has been saved on previous call 
  661. kAttemptDupCardEntryErr            EQU        -9106                ; The Enabler was asked to create a duplicate card entry 
  662. kCardPowerOffErr                EQU        -9107                ; Power to the card has been turned off 
  663. kNotZVCapableErr                EQU        -9108                ; This socket does not support Zoomed Video 
  664. kNoCardBusCISErr                EQU        -9109                ; No valid CIS exists for this CardBus card 
  665.     ENDIF ; __PCCARD__ 
  666.  
  667.